package com.szrt.day20170523.ch03.employee.dao;


import org.junit.Test;
import com.szrt.day20170523.ch03.employee.factory.DaoFactory;
import com.szrt.day20170523.ch03.employee.factory.Factory;

public class EmployeeDaoTest {
	
	
	@Test
	public void testName() throws Exception {
		
		//对象应该从工厂里面去拿
		
		Factory factory  = new DaoFactory();
		
		EmployeeDao dao = factory.getInstance(3306);
		
		String sql ="insert into employee values(2005,34,22000.00,'xxxx')";
		int counter =dao.add(sql);
		
		System.out.println(counter);
	}

}
